//
//  MNDMyIntegralListContainerController.m
//  minidai
//
//  Created by Steven.Yung on 2017/5/27.
//  Copyright © 2017年 迷你贷. All rights reserved.
//

#import "MNDMyIntegralListContainerController.h"
#import "MNDIntegralDetailViewController.h"
#import "MNDIntegralExchangeViewController.h"

@interface MNDMyIntegralListContainerController ()

@end

@implementation MNDMyIntegralListContainerController

- (NSArray<NSString *> *)titles {
    return @[@"积分明细",@"兑换记录"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    
    if (self) {
        self.menuViewStyle = WMMenuViewStyleLine;
        self.titleSizeSelected = 18.0;
        self.titleColorSelected = kColorOrange;
        self.titleSizeNormal = 18.0;
        self.titleColorNormal = kColorBlack;
        self.progressColor = kColorOrange;
        self.titleFontName = @"PingFangSC-Regular";
//        self.showOnNavigationBar = YES;
        self.menuHeight = 64.0;
        self.menuBGColor = [UIColor blackColor];
        self.menuViewLayoutMode = WMMenuViewLayoutModeCenter;
        self.menuView.backgroundColor = [UIColor whiteColor];
        
        self.viewFrame = CGRectMake(0, 0, kScreenWidth, 200);
    }
    
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController {
    return self.titles.count;
}

- (UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index {
    if (index == 0) {
        UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"PomelCircle" bundle:nil];
        MNDIntegralDetailViewController *integralDetailVC = [storyBoard instantiateViewControllerWithIdentifier:@"MNDIntegralDetailViewController"];
        return integralDetailVC;
    }else {
        UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"PomelCircle" bundle:nil];
        MNDIntegralExchangeViewController *integralExchangeVC = [storyBoard instantiateViewControllerWithIdentifier:@"MNDIntegralExchangeViewController"];
        return integralExchangeVC;
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
